﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

// Para los reportes
using Microsoft.Reporting.WebForms;
using System.Security.Principal;
using System.Net;

namespace Presentacion.controlasistencia
{
    public class reportesCredenciales : IReportServerCredentials
    {
        private string _userName;
        private string _password;
        private string _domain;

        public reportesCredenciales()
        {
            _userName = "Administrador";
            _password = "Windows2008Server!.";
            _domain = "192.168.100.2:86";

        }


        public WindowsIdentity ImpersonationUser
        {
            get
            {
                return WindowsIdentity.GetCurrent();
            }
        }

        public ICredentials NetworkCredentials
        {
            get
            {

                return new NetworkCredential(_userName, _password, _domain);

            }
        }
        public bool GetFormsCredentials(out Cookie authCookie,
                    out string userName, out string password,
                    out string authority)
        {
            authCookie = null;
            userName = _userName;
            password = _password;
            authority = _domain;
            return false;
        }
    }
}